#include<stdio.h>
int main()
{
	int money,n,a,b,c;
	scanf("%d",&money);
	n=money/25;
	printf("%d ",n);
	
	a=money%25;
	n=a/10;
	printf("%d ",n);
	
	b=a%10;
	n=b/5;
	printf("%d ",n);
	
	c=b%5;
	printf("%d\n",c);
}
